public class Person {
	String lastName;
	String firstName;
	int age;
	private String ssn;
	
	public Person() {
		
	}
	
	public Person(String firstName, String lastName, int age, String ssn) {
		this.firstName = firstName;
		this.lastName = lastName;
		this.age = age;
		this.ssn = ssn;
	}
	public String getssn() {
		return ssn;
	}
	public void setssn(String ssn) {
		this.ssn = ssn;
	}

	@Override 
	public boolean equals(Object person) {
		if (person.getClass() == Person.class ) {
			Person p = (Person)person;
			if (this.ssn == p.getssn())
				return true;
			else 
				return false;
		}
		else
			return false;
	}
		
	@Override
	public String toString() {
		String personString;
		personString = "First Name: " + firstName + "\nLast Name: " + lastName + "\nAge: " + age + "\nSSN:" + this.getssn();
		return personString;
	}
	
	@Override
	public int hashCode() {
		return this.ssn.hashCode();
	}
	
}

